package com.mineoj.service;

import com.mineoj.model.dto.questionlisttitle.QuestionListTitleAddRequest;
import com.mineoj.model.entity.QuestionListTitle;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mineoj.model.entity.User;

/**
* @author 明月
* @description 针对表【question_list_title(题单题目)】的数据库操作Service
* @createDate 2025-04-05 16:35:05
*/
public interface QuestionListTitleService extends IService<QuestionListTitle> {

    /**
     * 校验题目能不能添加到题单
     * @param questionListTitleAddRequest
     * @return
     */
    boolean validQuestionListTitle(QuestionListTitleAddRequest questionListTitleAddRequest);

    /**
     * 添加题目到题单
     *
     */
    int addQuestionListTitle(QuestionListTitleAddRequest questionListTitleAddRequest, User loginUser);

    /**
     * 添加题目到题单（内部服务）
     *
     * @param userId
     * @param questionListTitleAddRequest
     * @param add
     * @return
     */
    int addQuestionListTitleInner(long userId, QuestionListTitleAddRequest questionListTitleAddRequest, boolean add);
}
